const express = require('express')

const mock = express.Router()

// ItemOne
mock.get('/one', (req, res) => {
    let data =
        [
            {
                title: "流感病毒",
                num: 1827
            },
            {
                title: "H7N9病毒",
                num: 342
            },
            {
                title: "SARS病毒",
                num: 541
            },
            {
                title: "H1N1病毒",
                num: 1347
            },
            {
                title: "新冠病毒",
                num: 2431
            },
            {
                title: "甲 流",
                num: 876
            }
            ,
            {
                title: "诺如病毒",
                num: 1578
            }
        ]
    res.send({
        code: 200,
        data: data,
        message: '获取itemOne信息成功'
    })
})

// ItemTwo
mock.get('/two', (ewq, res) => {
    let day = ["星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"]
    let num = {
        Clothes: [140, 232, 101, 264, 90, 340, 250],
        digit: [120, 282, 111, 234, 220, 340, 310],
        Electrical: [320, 132, 201, 334, 190, 130, 220],
        gear: [220, 402, 231, 134, 190, 230, 120],
        Chemicals: [220, 302, 181, 234, 210, 290, 150]
    }

    res.send({
        code: 200,
        data: {
            day: day,
            num: num
        },
        message: '获取itemTwo信息成功'
    })
})

// ItemThree
mock.get('/three', (req, res) => {
    let data = [
        { value: 567, name: "碘伏" },
        { value: 123, name: "西林" },
        { value: 324, name: "吗啡" },
        { value: 453, name: "酒精" },
        { value: 767, name: "口罩" }
    ]
    res.send({
        code: 200,
        data: data,
        message: '获取itemThree信息成功'
    })
})

// ItemFour
mock.get('/four', (req, res) => {
    let day = ["3-5岁", "6-11岁", "12-18岁", "19-25岁", "26-35岁", "35-45岁", "46岁～"]
    let datas = {
        Clothes: [320, 502, 401, 334, 390, 430, 720],
        digit: [234, 564, 443, 234, 754, 430, 321],
        Electrical: [220, 321, 335, 534, 390, 330, 310],
        gear: [269, 212, 491, 368, 341, 330, 410],
        Chemicals: [820, 832, 901, 934, 1290, 1330, 1320]
    }
    res.send({
        code: 200,
        data: {
            day: day,
            datas: datas
        },
        message: '获取itemFour信息成功'
    })
})


module.exports = mock